export function getYear() {
    return new Date().getFullYear();
}
export function getMonth() {
    let month = new Date().getMonth() + 1
    return month > 9 ? month : '0' + month
}
export function getDate() {
    let date = new Date().getDate()
    return date > 9 ? date : '0' + date
}
export function getHours() {
    let hours = new Date().getHours()
    return hours > 9 ? hours : '0' + hours
}
export function getMinutes() {
    let minute = new Date().getMinutes()
    return minute > 9 ? minute : '0' + minute
}
export function propertyTime(originDate) {
  if (!originDate) return
  const dt = new Date(originDate);
  const y = dt.getFullYear();
  const m = (dt.getMonth() + 1 + "").padStart(2, "0");
  const d = (dt.getDate() + "").padStart(2, "0");

  const hh = (dt.getHours() + "").padStart(2, "0");
  const mm = (dt.getMinutes() + "").padStart(2, "0");
  const ss = (dt.getSeconds() + "").padStart(2, "0");

  return `${y}${m}${d}${hh}${mm}${ss}`;
}
export function propertyTimeJoin(timeString) {
  if (!timeString || timeString == 'null') return ''
  return timeString.substring(0, 4) + '-' + timeString.substring(4, 6) + '-' + timeString.substring(6, 8) + ' '
    + timeString.substring(8, 10) + ':' + timeString.substring(10, 12) + ':' + timeString.substring(12, 14)
}